home *** CD-ROM | disk | FTP | other *** search
/ Directorty Opus 5 - Magellan 2 / Opus 5 - Magellan 2.iso / Extras / DOpus511 / dopus_pch.lha / ARexx.lha / Arexx / lcd.dopus5 < prev    next >
Text File  |  1995-06-13  |  621b  |  35 lines

  1.  
  2. /*
  3. -----
  4. lcd.dopus5
  5. -----
  6.  
  7.    Opens a new lister in Opus 5 showing the current directory in the
  8.    shell you run it from.
  9.  
  10.    by Jonathan Potter, 7th May 1995
  11.  
  12.    Sample usage :
  13.  
  14.       alias lcd "rx dopus5:Arexx/lcd.dopus5"   (in shell-startup)
  15.       lcd                                    (from a shell)
  16. */
  17.  
  18. address 'DOPUS.1'
  19.  
  20. /* Get current directory.. there's probably an easier way of doing this */
  21. address command 'cd >t:temp-cd'
  22.  
  23. /* Open temp file */
  24. ok = open('in','t:temp-cd','r')
  25. if ok ~= 1 then exit
  26.  
  27. /* Read cd */
  28. cd = readln('in')
  29.  
  30. /* Open new lister */
  31. lister new cd
  32.  
  33. /* Bring dopus to front */
  34. dopus front
  35.